home *** CD-ROM | disk | FTP | other *** search
Unknown | 1990-02-24 | 4.1 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
| |
100%
| xdgMime
| image/x-tga
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0d 00 0a 0e f4 20 3e 48 | 45 41 50 53 74 72 0d 00 |..... >H|EAPStr..|
|00000010| 14 04 0d 00 1e 0f f4 20 | 49 61 6e 20 53 6d 69 74 |....... |Ian Smit|
|00000020| 68 0d 00 28 13 f4 20 46 | 65 62 72 75 61 72 79 20 |h..(.. F|ebruary |
|00000030| 31 39 39 30 0d 00 32 35 | f4 20 49 6e 63 6f 72 70 |1990..25|. Incorp|
|00000040| 6f 72 61 74 69 6e 67 20 | 41 73 73 65 6d 62 6b 65 |orating |Assembke|
|00000050| 72 20 63 6f 64 65 20 62 | 79 20 50 65 74 65 72 20 |r code b|y Peter |
|00000060| 43 6f 63 6b 65 72 65 6c | 6c 0d 00 3c 04 0d 00 46 |Cockerel|l..<...F|
|00000070| 34 f4 20 41 20 53 74 72 | 69 6e 67 20 53 6f 72 74 |4. A Str|ing Sort|
|00000080| 20 75 73 69 6e 67 20 52 | 69 73 63 20 4f 53 20 62 | using R|isc OS b|
|00000090| 75 69 6c 74 20 69 6e 20 | 48 65 61 70 20 53 6f 72 |uilt in |Heap Sor|
|000000a0| 74 0d 00 50 04 0d 00 5a | 27 4f 53 5f 53 6f 72 74 |t..P...Z|'OS_Sort|
|000000b0| 20 3d 20 26 34 46 20 20 | 20 20 20 20 20 20 3a 20 | = &4F | : |
|000000c0| f4 20 53 59 53 20 6e 75 | 6d 62 65 72 0d 00 64 04 |. SYS nu|mber..d.|
|000000d0| 0d 00 6e 32 f3 20 4e 75 | 6d 20 20 20 20 20 20 20 |..n2. Nu|m |
|000000e0| 20 20 20 20 20 20 3a 20 | f4 20 48 6f 77 20 6d 61 | : |. How ma|
|000000f0| 6e 79 20 73 74 72 69 6e | 67 73 20 74 6f 20 73 6f |ny strin|gs to so|
|00000100| 72 74 0d 00 78 2b de 20 | 57 6f 72 64 73 24 28 4e |rt..x+. |Words$(N|
|00000110| 75 6d 29 20 20 20 20 20 | 20 3a 20 f4 20 53 65 74 |um) | : . Set|
|00000120| 20 75 70 20 74 68 65 20 | 61 72 72 61 79 0d 00 82 | up the |array...|
|00000130| 04 0d 00 8c 3b f1 20 22 | 20 4f 72 69 67 69 6e 61 |....;. "| Origina|
|00000140| 6c 20 44 61 74 61 20 22 | 27 20 20 20 3a 20 f4 20 |l Data "|' : . |
|00000150| 52 65 61 64 20 69 6e 20 | 61 6e 64 20 64 69 73 70 |Read in |and disp|
|00000160| 6c 61 79 20 74 68 65 20 | 64 61 74 61 0d 00 96 2c |lay the |data...,|
|00000170| e3 20 57 6f 72 64 20 3d | 20 31 20 b8 20 4e 75 6d |. Word =| 1 . Num|
|00000180| 20 20 20 20 20 20 20 20 | 3a 20 f4 20 74 6f 20 62 | |: . to b|
|00000190| 65 20 73 6f 72 74 65 64 | 0d 00 a0 14 20 20 f3 20 |e sorted|.... . |
|000001a0| 57 6f 72 64 73 24 28 57 | 6f 72 64 29 0d 00 aa 14 |Words$(W|ord)....|
|000001b0| 20 20 f1 20 57 6f 72 64 | 73 24 28 57 6f 72 64 29 | . Word|s$(Word)|
|000001c0| 0d 00 b4 05 ed 0d 00 be | 05 f1 0d 00 c8 04 0d 00 |........|........|
|000001d0| d2 46 f2 61 73 73 65 6d | 62 6c 65 63 6f 6d 70 61 |.F.assem|blecompa|
|000001e0| 72 65 20 20 20 20 20 20 | 20 3a 20 f4 20 20 41 73 |re | : . As|
|000001f0| 73 65 6d 62 6c 65 20 74 | 68 65 20 63 6f 64 65 20 |semble t|he code |
|00000200| 74 6f 20 63 6f 6d 70 61 | 72 65 20 32 20 73 74 72 |to compa|re 2 str|
|00000210| 69 6e 67 73 0d 00 dc 04 | 0d 00 e6 0d 53 74 61 72 |ings....|....Star|
|00000220| 74 20 3d 20 91 0d 00 f0 | 04 0d 00 fa 42 f2 53 74 |t = ....|....B.St|
|00000230| 72 69 6e 67 53 6f 72 74 | 28 57 6f 72 64 73 24 28 |ringSort|(Words$(|
|00000240| 29 29 20 20 3a 20 f4 20 | 43 61 6c 6c 20 74 68 65 |)) : . |Call the|
|00000250| 20 53 6f 72 74 20 70 72 | 6f 63 65 64 75 72 65 20 | Sort pr|ocedure |
|00000260| 70 61 73 73 69 6e 67 20 | 74 68 65 0d 01 04 3f 20 |passing |the...? |
|00000270| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000280| 20 20 20 20 20 20 20 20 | 20 3a 20 f4 20 61 72 72 | | : . arr|
|00000290| 61 79 20 6f 66 20 73 74 | 72 69 6e 67 73 20 74 6f |ay of st|rings to|
|000002a0| 20 62 65 20 73 6f 72 74 | 65 64 0d 01 0e 04 0d 01 | be sort|ed......|
|000002b0| 18 0e 46 69 6e 69 73 68 | 20 3d 20 91 0d 01 22 1e |..Finish| = ...".|
|000002c0| 54 69 6d 65 74 61 6b 65 | 6e 20 3d 20 46 69 6e 69 |Timetake|n = Fini|
|000002d0| 73 68 20 2d 20 53 74 61 | 72 74 0d 01 2c 04 0d 01 |sh - Sta|rt..,...|
|000002e0| 36 3c f1 20 22 20 4e 6f | 77 20 53 6f 72 74 65 64 |6<. " No|w Sorted|
|000002f0| 20 22 27 20 20 20 20 20 | 3a 20 f4 20 44 69 73 70 | "' |: . Disp|
|00000300| 6c 61 79 20 74 68 65 20 | 64 61 74 61 20 41 46 54 |lay the |data AFT|
|00000310| 45 52 20 73 6f 72 74 69 | 6e 67 0d 01 40 14 e3 20 |ER sorti|ng..@.. |
|00000320| 57 6f 72 64 20 3d 20 31 | 20 b8 20 4e 75 6d 0d 01 |Word = 1| . Num..|
|00000330| 4a 14 20 20 f1 20 57 6f | 72 64 73 24 28 57 6f 72 |J. . Wo|rds$(Wor|
|00000340| 64 29 0d 01 54 05 ed 0d | 01 5e 05 f1 0d 01 68 04 |d)..T...|.^....h.|
|00000350| 0d 01 72 08 40 25 3d 32 | 0d 01 7c 30 f1 20 22 54 |..r.@%=2|..|0. "T|
|00000360| 69 6d 65 20 74 61 6b 65 | 6e 20 3a 20 22 3b 54 69 |ime take|n : ";Ti|
|00000370| 6d 65 74 61 6b 65 6e 20 | 2f 20 31 30 30 3b 22 20 |metaken |/ 100;" |
|00000380| 73 65 63 6f 6e 64 73 22 | 0d 01 86 04 0d 01 90 08 |seconds"|........|
|00000390| dc 20 31 32 0d 01 9a 38 | dc 20 45 72 61 74 6f 74 |. 12...8|. Eratot|
|000003a0| 68 65 6e 65 73 2c 49 61 | 6e 2c 4a 6f 6e 61 74 68 |henes,Ia|n,Jonath|
|000003b0| 61 6e 2c 46 72 65 64 65 | 72 69 63 6b 2c 53 69 64 |an,Frede|rick,Sid|
|000003c0| 6e 65 79 2c 41 6e 61 62 | 65 6c 6c 65 0d 01 a4 2a |ney,Anab|elle...*|
|000003d0| dc 20 46 72 69 65 64 61 | 2c 46 72 61 6e 63 69 73 |. Frieda|,Francis|
|000003e0| 2c 46 72 61 6e 63 65 73 | 2c 41 6e 6e 65 2c 41 6e |,Frances|,Anne,An|
|000003f0| 64 72 65 77 2c 49 0d 01 | ae 04 0d 01 b8 05 e0 0d |drew,I..|........|
|00000400| 01 c2 04 0d 01 cc 19 dd | 20 f2 53 74 72 69 6e 67 |........| .String|
|00000410| 53 6f 72 74 28 f8 20 41 | 24 28 29 29 0d 01 d6 04 |Sort(. A|$())....|
|00000420| 0d 01 e0 2e ea 20 53 69 | 7a 65 25 2c 52 31 25 2c |..... Si|ze%,R1%,|
|00000430| 43 61 73 65 25 2c 57 25 | 2c 57 6f 72 64 2c 4d 61 |Case%,W%|,Word,Ma|
|00000440| 78 4c 65 6e 67 74 68 2c | 4c 65 6e 67 74 68 0d 01 |xLength,|Length..|
|00000450| ea 04 0d 01 f4 46 53 69 | 7a 65 25 20 3d 20 de 28 |.....FSi|ze% = .(|
|00000460| 41 24 28 29 2c 31 29 20 | 20 20 20 20 20 3a 20 f4 |A$(),1) | : .|
|00000470| 20 46 69 6e 64 20 74 68 | 65 20 6e 75 6d 62 65 72 | Find th|e number|
|00000480| 20 6f 66 20 73 74 72 69 | 6e 67 73 20 74 6f 20 62 | of stri|ngs to b|
|00000490| 65 20 73 6f 72 74 65 64 | 0d 01 fe 04 0d 02 08 41 |e sorted|.......A|
|000004a0| 4d 61 78 4c 65 6e 67 74 | 68 20 3d 20 30 20 20 20 |MaxLengt|h = 0 |
|000004b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000004c0| 20 20 20 3a 20 f4 20 46 | 69 6e 64 20 74 68 65 20 | : . F|ind the |
|000004d0| 6c 65 6e 67 74 68 20 6f | 66 20 74 68 65 0d 02 12 |length o|f the...|
|000004e0| 36 e3 20 57 6f 72 64 20 | 3d 20 31 20 b8 20 53 69 |6. Word |= 1 . Si|
|000004f0| 7a 65 25 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ze% | |
|00000500| 20 3a 20 f4 20 4c 6f 6e | 67 65 73 74 20 73 74 72 | : . Lon|gest str|
|00000510| 69 6e 67 0d 02 1c 20 20 | 20 e7 20 a9 20 41 24 28 |ing... | . . A$(|
|00000520| 57 6f 72 64 29 20 3e 20 | 4d 61 78 4c 65 6e 67 74 |Word) > |MaxLengt|
|00000530| 68 20 8c 0d 02 26 1e 20 | 20 20 20 4d 61 78 4c 65 |h ...&. | MaxLe|
|00000540| 6e 67 74 68 20 3d 20 a9 | 20 41 24 28 57 6f 72 64 |ngth = .| A$(Word|
|00000550| 29 0d 02 30 07 20 20 cd | 0d 02 3a 0a ed 20 57 6f |)..0. .|..:.. Wo|
|00000560| 72 64 0d 02 44 04 0d 02 | 4e 42 4d 61 78 4c 65 6e |rd..D...|NBMaxLen|
|00000570| 67 74 68 20 3d 20 4d 61 | 78 4c 65 6e 67 74 68 20 |gth = Ma|xLength |
|00000580| 2b 20 31 20 20 20 20 20 | 20 3a 20 f4 20 41 64 64 |+ 1 | : . Add|
|00000590| 20 31 20 61 73 20 77 65 | 27 72 65 20 67 6f 69 6e | 1 as we|'re goin|
|000005a0| 67 20 74 6f 20 61 64 64 | 0d 02 58 42 20 20 20 20 |g to add|..XB |
|000005b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000005c0| 20 20 20 20 20 20 20 20 | 20 20 20 3a 20 f4 20 61 | | : . a|
|000005d0| 20 4e 55 4c 4c 20 63 68 | 61 72 61 63 74 65 72 20 | NULL ch|aracter |
|000005e0| 74 6f 20 74 68 65 20 65 | 6e 64 0d 02 62 04 0d 02 |to the e|nd..b...|
|000005f0| 6c 45 de 20 44 61 74 61 | 20 53 69 7a 65 25 2a 4d |lE. Data| Size%*M|
|00000600| 61 78 4c 65 6e 67 74 68 | 20 20 20 20 20 20 20 3a |axLength| :|
|00000610| 20 f4 20 42 6c 6f 63 6b | 20 6f 66 20 6d 65 6d 6f | . Block| of memo|
|00000620| 72 79 20 74 6f 20 68 6f | 6c 64 20 74 68 65 20 64 |ry to ho|ld the d|
|00000630| 61 74 61 0d 02 76 3b de | 20 50 6f 69 6e 74 65 72 |ata..v;.| Pointer|
|00000640| 73 25 20 53 69 7a 65 25 | 2a 34 20 20 20 20 20 20 |s% Size%|*4 |
|00000650| 20 20 20 20 3a 20 f4 20 | 42 6c 6f 63 6b 20 74 6f | : . |Block to|
|00000660| 20 68 6f 6c 64 20 70 6f | 69 6e 74 65 72 73 0d 02 | hold po|inters..|
|00000670| 80 04 0d 02 8a 41 50 6f | 73 25 20 3d 20 44 61 74 |.....APo|s% = Dat|
|00000680| 61 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |a | |
|00000690| 20 20 20 20 20 3a 20 f4 | 20 4e 6f 74 65 20 73 74 | : .| Note st|
|000006a0| 61 72 74 20 6f 66 20 73 | 74 6f 72 61 67 65 20 61 |art of s|torage a|
|000006b0| 72 65 61 0d 02 94 44 e3 | 20 57 25 20 3d 20 31 20 |rea...D.| W% = 1 |
|000006c0| b8 20 53 69 7a 65 25 20 | 20 20 20 20 20 20 20 20 |. Size% | |
|000006d0| 20 20 20 3a 20 f4 20 43 | 6f 70 79 20 74 68 65 20 | : . C|opy the |
|000006e0| 73 74 72 69 6e 67 73 20 | 69 6e 74 6f 20 74 68 69 |strings |into thi|
|000006f0| 73 20 62 6c 6f 63 6b 0d | 02 9e 4a 20 20 3f 50 6f |s block.|..J ?Po|
|00000700| 73 25 20 3d 20 a9 20 41 | 24 28 57 25 29 20 20 20 |s% = . A|$(W%) |
|00000710| 20 20 20 20 20 20 20 20 | 3a 20 f4 20 70 72 65 63 | |: . prec|
|00000720| 65 64 65 64 20 62 79 20 | 74 68 65 20 4c 45 4e 47 |eded by |the LENG|
|00000730| 54 48 20 6f 66 20 65 61 | 63 68 20 73 74 72 69 6e |TH of ea|ch strin|
|00000740| 67 0d 02 a8 46 20 20 24 | 28 50 6f 73 25 2b 31 29 |g...F $|(Pos%+1)|
|00000750| 20 3d 20 41 24 28 57 25 | 29 20 2b 20 bd 28 30 29 | = A$(W%|) + .(0)|
|00000760| 20 3a 20 f4 20 61 6e 64 | 20 66 6f 6c 6c 6f 77 65 | : . and| followe|
|00000770| 64 20 62 79 20 74 68 65 | 20 4e 55 4c 4c 20 43 68 |d by the| NULL Ch|
|00000780| 61 72 61 63 74 65 72 0d | 02 b2 48 20 20 50 6f 73 |aracter.|..H Pos|
|00000790| 25 3d 50 6f 73 25 2b 4d | 61 78 4c 65 6e 67 74 68 |%=Pos%+M|axLength|
|000007a0| 20 20 20 20 20 20 20 20 | 20 20 3a 20 f4 20 4d 6f | | : . Mo|
|000007b0| 76 65 20 74 6f 20 6e 65 | 78 74 20 73 65 63 74 69 |ve to ne|xt secti|
|000007c0| 6f 6e 20 6f 66 20 74 68 | 65 20 62 6c 6f 63 6b 0d |on of th|e block.|
|000007d0| 02 bc 05 ed 0d 02 c6 04 | 0d 02 d0 45 52 31 25 20 |........|...ER1% |
|000007e0| 3d 20 50 6f 69 6e 74 65 | 72 73 25 20 84 20 28 25 |= Pointe|rs% . (%|
|000007f0| 31 20 3c 3c 20 33 30 29 | 20 20 3a 20 f4 20 53 6f |1 << 30)| : . So|
|00000800| 72 74 20 74 68 65 20 70 | 6f 69 6e 74 65 72 73 20 |rt the p|ointers |
|00000810| 73 6f 20 73 65 74 20 42 | 49 54 20 33 30 0d 02 da |so set B|IT 30...|
|00000820| 49 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |I | |
|00000830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000840| 3a 20 f4 20 74 6f 20 63 | 6f 6e 73 74 72 75 63 74 |: . to c|onstruct|
|00000850| 20 74 68 65 20 61 72 72 | 61 79 20 6f 66 20 70 6f | the arr|ay of po|
|00000860| 69 6e 74 65 72 73 0d 02 | e4 04 0d 02 ee 25 f4 20 |inters..|.....%. |
|00000870| 52 30 20 68 6f 6c 64 73 | 20 74 68 65 20 6e 75 6d |R0 holds| the num|
|00000880| 62 65 72 20 6f 66 20 65 | 6c 65 6d 65 6e 74 73 0d |ber of e|lements.|
|00000890| 02 f8 2e f4 20 52 31 20 | 68 6f 6c 64 73 20 74 68 |.... R1 |holds th|
|000008a0| 65 20 61 64 64 72 65 73 | 73 20 6f 66 20 6c 69 73 |e addres|s of lis|
|000008b0| 74 20 6f 66 20 70 6f 69 | 6e 74 65 72 73 0d 03 02 |t of poi|nters...|
|000008c0| 31 f4 20 52 32 20 68 6f | 6c 64 73 20 74 68 65 20 |1. R2 ho|lds the |
|000008d0| 61 64 64 72 65 73 73 20 | 6f 66 20 74 68 65 20 63 |address |of the c|
|000008e0| 6f 6d 70 61 72 65 20 72 | 6f 75 74 69 6e 65 0d 03 |ompare r|outine..|
|000008f0| 0c 4a f4 20 52 33 20 68 | 6f 6c 64 73 20 74 68 65 |.J. R3 h|olds the|
|00000900| 20 61 64 64 72 65 73 73 | 20 6f 66 20 74 68 65 20 | address| of the |
|00000910| 77 6f 72 6b 73 70 61 63 | 65 20 63 6f 6d 70 61 72 |workspac|e compar|
|00000920| 65 20 6e 65 65 64 73 2c | 20 6e 6f 74 20 6e 65 65 |e needs,| not nee|
|00000930| 64 65 64 20 68 65 72 65 | 0d 03 16 45 f4 20 52 34 |ded here|...E. R4|
|00000940| 20 68 6f 6c 64 73 20 74 | 68 65 20 61 64 64 72 65 | holds t|he addre|
|00000950| 73 73 20 6f 66 20 74 68 | 65 20 62 6c 6f 63 6b 20 |ss of th|e block |
|00000960| 68 6f 6c 64 69 6e 67 20 | 74 68 65 20 64 61 74 61 |holding |the data|
|00000970| 20 74 6f 20 62 65 20 73 | 6f 72 74 65 64 0d 03 20 | to be s|orted.. |
|00000980| 35 f4 20 52 35 20 68 6f | 6c 64 73 20 74 68 65 20 |5. R5 ho|lds the |
|00000990| 73 69 7a 65 20 6f 66 20 | 65 61 63 68 20 65 6c 65 |size of |each ele|
|000009a0| 6d 65 6e 74 20 74 6f 20 | 62 65 20 73 6f 72 74 65 |ment to |be sorte|
|000009b0| 64 2e 0d 03 2a 2f f4 20 | 20 20 20 74 68 65 20 6d |d...*/. | the m|
|000009c0| 61 78 69 6d 75 6d 20 73 | 74 72 69 6e 67 20 6c 65 |aximum s|tring le|
|000009d0| 6e 67 74 68 20 69 6e 20 | 74 68 69 73 20 63 61 73 |ngth in |this cas|
|000009e0| 65 0d 03 34 37 f4 20 52 | 36 20 77 6f 75 6c 64 20 |e..47. R|6 would |
|000009f0| 68 6f 6c 64 20 61 20 77 | 6f 72 6b 73 70 61 63 65 |hold a w|orkspace|
|00000a00| 20 61 64 64 64 72 65 73 | 73 20 69 66 20 52 35 20 | adddres|s if R5 |
|00000a10| 69 73 20 3e 20 31 36 4b | 0d 03 3e 04 0d 03 48 45 |is > 16K|..>...HE|
|00000a20| c8 99 20 4f 53 5f 53 6f | 72 74 2c 53 69 7a 65 25 |.. OS_So|rt,Size%|
|00000a30| 2c 52 31 25 2c 73 74 72 | 43 6d 70 2c 2c 44 61 74 |,R1%,str|Cmp,,Dat|
|00000a40| 61 2c 4d 61 78 4c 65 6e | 67 74 68 20 20 20 3a 20 |a,MaxLen|gth : |
|00000a50| f4 20 55 53 45 20 4f 53 | 5f 48 65 61 70 53 6f 72 |. USE OS|_HeapSor|
|00000a60| 74 0d 03 52 04 0d 03 5c | 3d 50 6f 73 25 3d 20 44 |t..R...\|=Pos%= D|
|00000a70| 61 74 61 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ata | |
|00000a80| 20 20 20 20 20 20 20 20 | 20 20 20 20 3a 20 f4 20 | | : . |
|00000a90| 43 6f 70 79 20 74 68 65 | 20 64 61 74 61 20 62 61 |Copy the| data ba|
|00000aa0| 63 6b 0d 03 66 42 e3 20 | 57 25 20 3d 20 31 20 b8 |ck..fB. |W% = 1 .|
|00000ab0| 20 53 69 7a 65 25 20 20 | 20 20 20 20 20 20 20 20 | Size% | |
|00000ac0| 20 20 20 20 20 20 3a 20 | f4 20 4a 75 73 74 20 74 | : |. Just t|
|00000ad0| 68 65 20 72 65 76 65 72 | 73 65 20 6f 66 20 62 65 |he rever|se of be|
|00000ae0| 66 6f 72 65 0d 03 70 14 | 20 20 4c 65 6e 67 74 68 |fore..p.| Length|
|00000af0| 20 3d 20 3f 50 6f 73 25 | 0d 03 7a 3c 20 20 41 24 | = ?Pos%|..z< A$|
|00000b00| 28 57 25 29 3d 20 c0 24 | 28 50 6f 73 25 2b 31 29 |(W%)= .$|(Pos%+1)|
|00000b10| 2c 4c 65 6e 67 74 68 29 | 20 20 3a 20 f4 20 4a 75 |,Length)| : . Ju|
|00000b20| 73 74 20 63 6f 70 79 20 | 77 68 61 74 20 77 65 20 |st copy |what we |
|00000b30| 6e 65 65 64 0d 03 84 19 | 20 20 50 6f 73 25 3d 50 |need....| Pos%=P|
|00000b40| 6f 73 25 2b 4d 61 78 4c | 65 6e 67 74 68 0d 03 8e |os%+MaxL|ength...|
|00000b50| 05 ed 0d 03 98 04 0d 03 | a2 05 e1 0d 03 ac 04 0d |........|........|
|00000b60| 03 b6 04 0d 03 c0 16 dd | 20 f2 61 73 73 65 6d 62 |........| .assemb|
|00000b70| 6c 65 63 6f 6d 70 61 72 | 65 0d 03 ca 04 0d 03 d4 |lecompar|e.......|
|00000b80| 47 f4 20 54 68 69 73 20 | 72 6f 75 74 69 6e 65 20 |G. This |routine |
|00000b90| 69 73 20 61 20 64 69 72 | 65 63 74 20 63 6f 70 79 |is a dir|ect copy|
|00000ba0| 20 6f 66 20 74 68 65 20 | 72 6f 75 74 69 6e 65 20 | of the |routine |
|00000bb0| 69 6e 20 50 65 74 65 72 | 20 43 6f 63 6b 65 72 65 |in Peter| Cockere|
|00000bc0| 6c 6c 27 73 0d 03 de 37 | f4 20 42 6f 6f 6b 20 6f |ll's...7|. Book o|
|00000bd0| 6e 20 41 53 53 45 4d 42 | 4c 59 20 4c 41 4e 47 55 |n ASSEMB|LY LANGU|
|00000be0| 41 47 45 20 50 52 4f 47 | 52 41 4d 4d 49 4e 47 20 |AGE PROG|RAMMING |
|00000bf0| 66 6f 72 20 74 68 65 20 | 41 52 4d 0d 03 e8 39 f4 |for the |ARM...9.|
|00000c00| 20 49 74 20 69 73 20 74 | 68 65 72 66 6f 72 65 20 | It is t|herfore |
|00000c10| 74 68 65 20 63 6f 70 79 | 72 69 67 68 74 20 6f 66 |the copy|right of|
|00000c20| 20 74 68 65 20 50 75 62 | 6c 69 73 68 65 72 27 73 | the Pub|lisher's|
|00000c30| 20 4d 54 43 0d 03 f2 4a | f4 20 49 27 76 65 20 6a | MTC...J|. I've j|
|00000c40| 75 73 74 20 70 75 74 20 | 74 68 65 20 72 65 6c 65 |ust put |the rele|
|00000c50| 76 61 6e 74 20 62 69 74 | 20 69 6e 74 6f 20 61 20 |vant bit| into a |
|00000c60| 50 52 4f 43 45 44 55 52 | 45 20 77 69 74 68 20 4c |PROCEDUR|E with L|
|00000c70| 4f 43 41 4c 20 76 61 72 | 69 61 62 6c 65 73 0d 03 |OCAL var|iables..|
|00000c80| fc 20 f4 20 74 6f 20 6d | 61 6b 65 20 69 74 20 73 |. . to m|ake it s|
|00000c90| 65 6c 66 20 63 6f 6e 74 | 61 69 6e 65 64 2e 0d 04 |elf cont|ained...|
|00000ca0| 06 04 0d 04 10 23 de 20 | 6f 72 67 20 32 30 30 2c |.....#. |org 200,|
|00000cb0| 20 62 75 66 66 31 20 31 | 30 30 2c 20 62 75 66 66 | buff1 1|00, buff|
|00000cc0| 32 20 31 30 30 0d 04 1a | 39 ea 20 73 74 72 31 2c |2 100...|9. str1,|
|00000cd0| 73 74 72 32 2c 6c 65 6e | 31 2c 6c 65 6e 32 2c 69 |str2,len|1,len2,i|
|00000ce0| 6e 64 65 78 2c 66 6c 61 | 67 73 2c 63 68 61 72 31 |ndex,fla|gs,char1|
|00000cf0| 2c 63 68 61 72 32 2c 73 | 70 2c 6c 69 6e 6b 0d 04 |,char2,s|p,link..|
|00000d00| 24 04 0d 04 2e 17 73 74 | 72 31 20 20 3d 20 30 3a |$.....st|r1 = 0:|
|00000d10| 73 74 72 32 20 20 3d 20 | 31 0d 04 38 17 6c 65 6e |str2 = |1..8.len|
|00000d20| 31 20 20 3d 20 32 3a 6c | 65 6e 32 20 20 3d 20 33 |1 = 2:l|en2 = 3|
|00000d30| 0d 04 42 0d 69 6e 64 65 | 78 20 3d 20 34 0d 04 4c |..B.inde|x = 4..L|
|00000d40| 10 66 6c 61 67 73 20 3d | 20 6c 65 6e 32 0d 04 56 |.flags =| len2..V|
|00000d50| 17 63 68 61 72 31 20 3d | 20 35 3a 63 68 61 72 32 |.char1 =| 5:char2|
|00000d60| 20 3d 20 36 0d 04 60 0e | 73 70 20 20 20 20 3d 20 | = 6..`.|sp = |
|00000d70| 31 33 0d 04 6a 0e 6c 69 | 6e 6b 20 20 3d 20 31 34 |13..j.li|nk = 14|
|00000d80| 0d 04 74 04 0d 04 7e 16 | e3 20 70 61 73 73 20 3d |..t...~.|. pass =|
|00000d90| 20 30 20 b8 20 32 20 88 | 20 32 0d 04 88 04 0d 04 | 0 . 2 .| 2......|
|00000da0| 92 0d 20 20 50 25 3d 20 | 6f 72 67 0d 04 9c 10 20 |.. P%= |org.... |
|00000db0| 20 5b 20 6f 70 74 20 70 | 61 73 73 0d 04 a6 0d 20 | [ opt p|ass.... |
|00000dc0| 20 2e 73 74 72 43 6d 70 | 0d 04 b0 25 20 20 20 20 | .strCmp|...% |
|00000dd0| 53 54 4d 46 44 20 28 73 | 70 29 21 2c 7b 73 74 72 |STMFD (s|p)!,{str|
|00000de0| 31 2d 63 68 61 72 32 2c | 6c 69 6e 6b 7d 0d 04 ba |1-char2,|link}...|
|00000df0| 1c 20 20 20 20 4c 44 52 | 42 20 20 6c 65 6e 31 2c |. LDR|B len1,|
|00000e00| 5b 73 74 72 31 5d 2c 23 | 31 0d 04 c4 1c 20 20 20 |[str1],#|1.... |
|00000e10| 20 4c 44 52 42 20 20 6c | 65 6e 32 2c 5b 73 74 72 | LDRB l|en2,[str|
|00000e20| 32 5d 2c 23 31 0d 04 ce | 17 20 20 20 20 43 4d 50 |2],#1...|. CMP|
|00000e30| 20 20 20 6c 65 6e 31 2c | 6c 65 6e 32 0d 04 d8 17 | len1,|len2....|
|00000e40| 20 20 20 20 4d 4f 56 47 | 54 20 6c 65 6e 31 2c 6c | MOVG|T len1,l|
|00000e50| 65 6e 32 0d 04 e2 16 20 | 20 20 20 4d 4f 56 20 20 |en2.... | MOV |
|00000e60| 20 66 6c 61 67 73 2c 70 | 63 0d 04 ec 16 20 20 20 | flags,p|c.... |
|00000e70| 20 4d 4f 56 20 20 20 69 | 6e 64 65 78 2c 23 30 0d | MOV i|ndex,#0.|
|00000e80| 04 f6 0f 20 20 2e 73 74 | 72 43 6d 70 4c 70 0d 05 |... .st|rCmpLp..|
|00000e90| 00 18 20 20 20 20 43 4d | 50 20 20 20 69 6e 64 65 |.. CM|P inde|
|00000ea0| 78 2c 6c 65 6e 31 0d 05 | 0a 17 20 20 20 20 42 45 |x,len1..|.. BE|
|00000eb0| 51 20 20 20 73 74 72 43 | 6d 70 45 6e 64 0d 05 14 |Q strC|mpEnd...|
|00000ec0| 20 20 20 20 20 4c 44 52 | 42 20 20 63 68 61 72 31 | LDR|B char1|
|00000ed0| 2c 5b 73 74 72 31 2c 69 | 6e 64 65 78 5d 0d 05 1e |,[str1,i|ndex]...|
|00000ee0| 20 20 20 20 20 4c 44 52 | 42 20 20 63 68 61 72 32 | LDR|B char2|
|00000ef0| 2c 5b 73 74 72 32 2c 69 | 6e 64 65 78 5d 0d 05 28 |,[str2,i|ndex]..(|
|00000f00| 1c 20 20 20 20 41 44 44 | 20 20 20 69 6e 64 65 78 |. ADD| index|
|00000f10| 2c 69 6e 64 65 78 2c 23 | 31 0d 05 32 19 20 20 20 |,index,#|1..2. |
|00000f20| 20 43 4d 50 20 20 20 63 | 68 61 72 31 2c 63 68 61 | CMP c|har1,cha|
|00000f30| 72 32 0d 05 3c 16 20 20 | 20 20 42 45 51 20 20 20 |r2..<. | BEQ |
|00000f40| 73 74 72 43 6d 70 4c 70 | 0d 05 46 04 0d 05 50 19 |strCmpLp|..F...P.|
|00000f50| 20 20 20 20 53 54 52 20 | 20 20 70 63 2c 74 68 65 | STR | pc,the|
|00000f60| 46 6c 61 67 73 0d 05 5a | 23 20 20 20 20 4c 44 4d |Flags..Z|# LDM|
|00000f70| 46 44 20 28 73 70 29 21 | 2c 7b 73 74 72 31 2d 63 |FD (sp)!|,{str1-c|
|00000f80| 68 61 72 32 2c 70 63 7d | 0d 05 64 04 0d 05 6e 10 |har2,pc}|..d...n.|
|00000f90| 20 20 2e 73 74 72 43 6d | 70 45 6e 64 0d 05 78 16 | .strCm|pEnd..x.|
|00000fa0| 20 20 20 20 54 45 51 50 | 20 20 66 6c 61 67 73 2c | TEQP| flags,|
|00000fb0| 23 30 0d 05 82 04 0d 05 | 8c 19 20 20 20 20 53 54 |#0......|.. ST|
|00000fc0| 52 20 20 20 70 63 2c 74 | 68 65 46 6c 61 67 73 0d |R pc,t|heFlags.|
|00000fd0| 05 96 23 20 20 20 20 4c | 44 4d 46 44 20 28 73 70 |..# L|DMFD (sp|
|00000fe0| 29 21 2c 7b 73 74 72 31 | 2d 63 68 61 72 32 2c 70 |)!,{str1|-char2,p|
|00000ff0| 63 7d 0d 05 a0 04 0d 05 | aa 0f 20 20 2e 74 68 65 |c}......|.. .the|
|00001000| 46 6c 61 67 73 0d 05 b4 | 0f 20 20 20 20 45 51 55 |Flags...|. EQU|
|00001010| 44 20 20 30 0d 05 be 04 | 0d 05 c8 07 20 20 5d 0d |D 0....|.... ].|
|00001020| 05 d2 04 0d 05 dc 0c 20 | 20 ed 20 70 61 73 73 0d |....... | . pass.|
|00001030| 05 e6 05 e1 0d ff | |...... | |
+--------+-------------------------+-------------------------+--------+--------+